package com.gxa.email.dto;

import com.gxa.email.gruop.Send;
import lombok.Data;
import org.springframework.stereotype.Component;

import javax.validation.constraints.NotNull;
import java.io.Serializable;


@Data
@Component
public class MailDTO implements Serializable {
    //邮件的主题
    @NotNull(message = "主题不能为空！",groups = {Send.class})
    private String subject;

    private String from = "377576540@qq.com";

    //邮件的接收者
    @NotNull(message = "接收者不能为空！",groups = {Send.class})
    private String[] to;

    //邮件的抄送人
    @NotNull(message = "抄送人不能为空！",groups = {Send.class})
    private String[] cc;

    //邮件的正文
    @NotNull(message = "正文不能为空！",groups = {Send.class})
    private String text;
}
